package com.example.sup.conttroller;
import com.example.sup.conttroller.response.ServerResponse;
import com.example.sup.entity.Version;
import com.example.sup.service.VersionService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import javax.annotation.Resource;
import java.util.List;

/**
 * @ClassName VersionController
 * @Description {TODO}
 * @Author 李哲
 * @Date 10:23 2024/7/24
 * @Version 1.0
 */
@RestController
@Slf4j
@RequestMapping("/version")
public class VersionController {

    @Resource
    private VersionService versionService;

    @PostMapping("/query")
    public ServerResponse query() {
        List<Version> versions = versionService.list();
        return ServerResponse.successWithMsg("操作成功",versions);
//        QueryChainWrapper<Version> query = versionService.query();
//
//        return ServerResponse.successWithMsg("操作成功",query);
    }
}
